<?php include_stylesheets_for_form($filter_form) ?>
<?php include_javascripts_for_form($filter_form) ?>


  <?php if ($filter_form->hasGlobalErrors()): ?>
    <?php echo $filter_form->renderGlobalErrors() ?>
  <?php endif; ?>

  <b><?php echo __('Материалы и каталоги')?></b>

  <form action="<?php echo url_for('material_collection', array('action' => 'filter')) ?>" method="post">
    <table cellspacing="0" >
      <tr>
      
      <?php foreach ($configuration->getFormFilterFields($filter_form) as $name => $field): ?>
        <td>
        <?php if ((isset($filter_form[$name]) && $filter_form[$name]->isHidden()) || (!isset($filter_form[$name]) && $field->isReal())) continue ?>
          <?php include_partial('material/filters_field', array(
            'name'       => $name,
            'attributes' => $field->getConfig('attributes', array()),
            'label'      => $field->getConfig('label'),
            'help'       => $field->getConfig('help'),
            'form'       => $filter_form,
            'field'      => $field,
            'class'      => 'sf_admin_form_row sf_admin_'.strtolower($field->getType()).' sf_admin_filter_field_'.$name,
          )) ?>
         </td> 
        <?php endforeach; ?>
        
      
      <td>
       <?php echo $filter_form->renderHiddenFields() ?>
            <?php echo link_to(__('Reset', array(), 'sf_admin'), 'material_collection', array('action' => 'filter'), array('query_string' => '_reset', 'method' => 'post')) ?>
        <input type="submit" value="<?php echo __('Filter', array(), 'sf_admin') ?>" />
      </td>
      
      </tr>
    </table>
  </form>

